import { reSearch } from '@/api'

// 暴露小仓库
export default {
  actions: {
    async reqSearch({ commit }, payload) {
      let reslut = await reSearch(payload)
      // console.log(reslut.data);
      if (reslut.code === 200) {
        commit('REQSEARCH', reslut.data)
      }
    }
  },
  mutations: {
    REQSEARCH(state, value) {
      state.goodsList = value
    }
  },
  state: {
    goodsList: {} //准备一个空对象
  },
}